package com.iogogogo.tenant.service.impl;

import com.iogogogo.tenant.pojo.entity.UserEntity;
import com.iogogogo.tenant.repository.UserRepository;
import com.iogogogo.tenant.service.UserService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by tao.zeng on 2021/8/8.
 */
@Service
public class UserServiceImpl implements UserService {

    private final UserRepository userRepository;

    public UserServiceImpl(UserRepository userRepository) {
        this.userRepository = userRepository;
    }

    @Override
    public List<UserEntity> findAll() {
        return userRepository.findAll();
    }

    @Override
    public UserEntity findById(Long userId) {
        return userRepository.findById(userId);
    }
}
